﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Model;
using System.Text.RegularExpressions;
using Dal;

namespace Bll
{
    public class bllNavigation
    {
        DalNavigation d = new DalNavigation();
        
        
        public bool judge(String a)
        {
            if (a == "null")
            {
                return false;
            }
            else
            {
                return true;
            }
        }
        public String TableName(int a)
        {
            if (a == 1) { return "DepartmentProfileDirectory"; }
            else if (a == 2) { return "NewsInformationDirectory"; }
            else if (a == 3) { return "TeachingScientificResearchDirectory"; }
            else if (a == 4) { return "StudentWorkDirectory"; }
            else if (a == 5) { return "EnrollmentEmploymentDirectory"; }
            else if (a == 6) { return "RulesRegulationsDirectory"; }
            else if (a == 7) { return "DataDownloadDirectory"; }
            else { return "null"; }
        }

        

        public string Update_Information(ModelPublic m)
        {
            
                if (d.Update_Information(m))
                {
                    return "修改成功！";
                }
                else
                {
                    return "修改失败！";
                }
        }
        
        public DataTable Nav_Name_All()
        {
            return d.Nav_Name_All();
        }

        public DataTable SubNavContent(ModelPublic m)
        {
            return d.SubNavContent(m);
        }

        public bool Data_Delete(ModelPublic m)
        {
            //SubNavDel
            return d.Data_Delete(m);
        }

        public bool SubNav_Add(ModelPublic m)
        {
            //NavAdd
            return d.SubNav_Add(m);
        }
    }
}
